package com.baihang.project.ds.webSocket;

import java.io.IOException;

import org.springframework.web.socket.TextMessage;
import org.springframework.web.socket.WebSocketSession;
import org.springframework.web.socket.handler.TextWebSocketHandler;

public class DsWebSocketHandler extends TextWebSocketHandler {
	
	public static WebSocketSession mysession;
	@Override
    public void handleTextMessage(WebSocketSession session, TextMessage message) throws IOException {
		System.err.println("接收到了");
		mysession = session;
		session.sendMessage(new TextMessage("hello world."));    
    }

}
